/*
 * @Author: wangqizhang
 * @Date: 2024-05-07 09:28:08
 * @LastEditors: wangqizhang
 * @LastEditTime: 2024-05-07 10:42:04
 * @FilePath: /suixinji-react/src/store/modules/noteStore.ts
 * @Description:
 *
 * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved.
 */
import { createSlice } from '@reduxjs/toolkit';
const noteStore = createSlice({
  name: 'user',
  initialState: {
    noteInfo: {},
  },
  reducers: {
    setNote: (state, action) => {
      state.noteInfo = action.payload;
    },
    removeNote: (state) => {
      state.noteInfo = {};
    },
  },
});
const { setNote, removeNote } = noteStore.actions;
const noteReducer = noteStore.reducer;
export { setNote, removeNote };
export default noteReducer;
